﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Supersense.db;
public partial class admin_product_add : System.Web.UI.Page
{
    private Database db = new Database();
    public TreeView treeView;

    protected void Page_Load(object sender, EventArgs e)
    {

            treeView = new TreeView();

            Crud modelCategory = new Crud("ss_category", "id");
            DataTable dt = modelCategory.fList("type='product' and upid = 0 ", "", "", "");
            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    TreeNode tn = new TreeNode();
                    tn.Text = dr["name"].ToString().Trim();
                    tn.Value = dr["id"].ToString().Trim();
                    treeView.Nodes.Add(tn);
                }
            }

    }

}
